﻿<%@ Page Title="" Language="C#" MasterPageFile="~/rightContent.Master" AutoEventWireup="true" CodeBehind="CustomSheetView.aspx.cs" Inherits="WEB.sheetInfo.CustomSheetView" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="styles.css" rel="stylesheet" type="text/css">
     
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="title" runat="server">
    报表信息统计
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
    <table style="width: 100%;">
        <tr height="30px">
            <td>
            </td>
        </tr>
        <tr align="center">
            <td>
                时间范围：<asp:TextBox ID="tbTimestart" runat="server" class="Wdate"></asp:TextBox>
                至<asp:TextBox ID="tbTimestop" runat="server" class="Wdate"></asp:TextBox>
                            <asp:DropDownList ID="ddlasc" runat="server" AutoPostBack="true" 
                                onselectedindexchanged="ddlasc_SelectedIndexChanged">
                                <asp:ListItem Value="asc">升序</asp:ListItem>
                                <asp:ListItem Value="desc">降序</asp:ListItem>
                            </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:DropDownList ID="ddlQuery" runat="server" Style="text-align: right" Width="101px">
                    <asp:ListItem Value="sheetID">委托单单号</asp:ListItem>
                    <asp:ListItem Value="customsNo">报关单号</asp:ListItem>
                    <asp:ListItem Value="inspectionNo">报检单号</asp:ListItem>
                    <asp:ListItem Value="ladingBillNO">提单号</asp:ListItem>
                    <asp:ListItem Value="CustomerName">客户名</asp:ListItem>
                    <asp:ListItem Value="goodsName">货物名称</asp:ListItem>
                </asp:DropDownList>
                <asp:TextBox ID="tbQuery" runat="server" Width="233px"></asp:TextBox>
                <asp:Button ID="btnQuery" runat="server" Text="  查 询" OnClick="btnQuery_Click" CssClass="Submit_Query" />
            </td>
        </tr>
        <tr>
            <td>
                选择显示的列名：
                <asp:Panel ID="panelCondition" runat="server" >
                    <asp:CheckBox ID="cbsheetid" runat="server" Text="单号" Checked="True" />
                    <asp:CheckBox ID="cbPO" runat="server" Text="PO" Checked="True"/>
                    <asp:CheckBox ID="cbtypeID" runat="server" Text="类型" Checked="True"/>
                    <asp:CheckBox ID="cbinOut" runat="server" Text="进出口" Checked="True"/>
                    <asp:CheckBox ID="cbCustomerName" runat="server" Text="客户" Checked="True"/>
                    <asp:CheckBox ID="cbcodeName" runat="server" Text="货物类型" Checked="True"/>
                    <asp:CheckBox ID="cbtradeType" runat="server" Text="贸易类型" Checked="True"/>
                    <asp:CheckBox ID="cbagencyDate" runat="server" Text="委托日期" Checked="True"/>
                    <asp:CheckBox ID="cbshipName" runat="server" Text="船名" Checked="True"/>
                    <asp:CheckBox ID="cbgoodsName" runat="server" Text="货物名称" Checked="True"/>
                    <asp:CheckBox ID="cbNo" runat="server" Text="数量" Checked="True"/>
                    <asp:CheckBox ID="cbgrossWeight" runat="server" Text="毛重" Checked="True"/>
                    <asp:CheckBox ID="cbgoodsValue" runat="server" Text="货值" Checked="True"/>
                    <asp:CheckBox ID="cbcustomsNo" runat="server" Text="报关单号" Checked="True"/>
                    <asp:CheckBox ID="cbladingBillNo" runat="server" Text="提单号" Checked="True"/>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="gvSheetInfo" runat="server" CellPadding="4" CssClass="distance"
                    DataKeyNames="sheetID" OnRowEditing="gvSheetInfo_RowEditing" Style="text-align: center"
                    AutoGenerateColumns="False" OnRowCommand="gvSheetInfo_RowCommand" OnRowDataBound="gvSheetInfo_RowDataBound"
                    AllowPaging="True" OnPageIndexChanging="gvSheetInfo_PageIndexChanging" PageSize="5"
                    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
                    ForeColor="Black" GridLines="Vertical" Width="1360px">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="sheetID" HeaderText="单号" >
                        <HeaderStyle Width="40px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="PO" HeaderText="PO" >
                        <HeaderStyle Width="60px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="typeID" HeaderText="类型" >
                        <HeaderStyle Width="60px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="codeName1" HeaderText="进出口" >
                        <HeaderStyle Width="60px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CustomerName" HeaderText="客户" >
                        <HeaderStyle Width="90px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="codeName" HeaderText="货物类型" >
                        <HeaderStyle Width="90px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="codeName2" HeaderText="贸易类型" >
                        <HeaderStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="agencyDate" HeaderText="委托日期" 
                            DataFormatString="{0:d}" >
                        <HeaderStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="shipName" HeaderText="船名" >
                        <HeaderStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="goodsName" HeaderText="货物名称" >
                        <HeaderStyle Width="90px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="No" HeaderText="数量" >
                        <HeaderStyle Width="120px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="grossWeight" HeaderText="毛重" >
                        <HeaderStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="goodsValue" HeaderText="货值" >
                        <HeaderStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="customsNo" HeaderText="报关单号" >
                        <HeaderStyle Width="100px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="ladingBillNo" HeaderText="提单号">
                        <HeaderStyle Width="100px" />
                        </asp:BoundField>
                        
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" Height="30px" />
                    <PagerSettings FirstPageText="第一页" LastPageText="最后一页" 
                        Mode="NextPreviousFirstLast" NextPageText="下一页" PreviousPageText="上一页" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                    <SortedAscendingHeaderStyle BackColor="#848384" />
                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                    <SortedDescendingHeaderStyle BackColor="#575357" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td>
                <div class="tltle">报表情况统计 
                    <asp:Button ID="btnToExcel" runat="server" CssClass="Submit_yellowbig" 
                      Text="导出成EXCEL" onclick="btnToExcel_Click" />
                </div>
                <asp:Panel ID="panelCalc" runat="server" CssClass="center" >
                    <asp:Table ID="tableCalc" runat="server" BorderStyle="Dashed" BorderWidth="2px" 
                        CellPadding="2" CellSpacing="2" GridLines="Both" Font-Size="16pt" 
                        Font-Bold="True" CssClass="mytable">
                        <asp:TableRow>
                            <asp:TableCell RowSpan="2">
                                日期
                            </asp:TableCell>
                            <asp:TableCell ColumnSpan="6" HorizontalAlign="Center">
                                票数
                            </asp:TableCell>

                            <asp:TableCell RowSpan="2">
                                总票数
                            </asp:TableCell>
                            <asp:TableCell RowSpan="2">
                                集装箱（标准箱个数）
                            </asp:TableCell>
                            <asp:TableCell RowSpan="2">
                                重量（千克）
                            </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                            <asp:TableCell>
                                进口
                            </asp:TableCell>
                            <asp:TableCell>
                                出口
                            </asp:TableCell>
                            <asp:TableCell>
                                单独报检
                            </asp:TableCell>
                            <asp:TableCell>
                                加签
                            </asp:TableCell>
                            <asp:TableCell>
                                危险品
                            </asp:TableCell>
                            <asp:TableCell>
                                其他
                            </asp:TableCell>
                        </asp:TableRow>
                    </asp:Table>
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>
